﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace MSRoomLocator.ViewModels
{
    public class BuildingViewModel : INotifyPropertyChanged
    {
        private string _name;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                if (value != _name)
                {
                    _name = value;
                    NotifyPropertyChanged("Name");
                }
            }
        }

        private int _floors;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public int Floors
        {
            get
            {
                return _floors;
            }
            set
            {
                if (value != _floors)
                {
                    _floors = value;
                    NotifyPropertyChanged("Floors");
                }
            }
        }

        private double _latitude;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public double Latitude
        {
            get
            {
                return _latitude;
            }
            set
            {
                if (value != _latitude)
                {
                    _latitude = value;
                    NotifyPropertyChanged("Latitude");
                }
            }
        }

        private double _longitude;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public double Longitude
        {
            get
            {
                return _longitude;
            }
            set
            {
                if (value != _longitude)
                {
                    _longitude = value;
                    NotifyPropertyChanged("Longitude");
                }
            }
        }

        private double _topleftLatitude;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public double TopLeftLatitude
        {
            get
            {
                return _topleftLatitude;
            }
            set
            {
                if (value != _topleftLatitude)
                {
                    _topleftLatitude = value;
                    NotifyPropertyChanged("TopLeftLatitude");
                }
            }
        }

        private double _topleftLongitude;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public double TopLeftLongitude
        {
            get
            {
                return _topleftLongitude;
            }
            set
            {
                if (value != _topleftLongitude)
                {
                    _topleftLongitude = value;
                    NotifyPropertyChanged("TopLeftLongitude");
                }
            }
        }

        private double _bottomrightLatitude;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public double BottomRightLatitude
        {
            get
            {
                return _bottomrightLatitude;
            }
            set
            {
                if (value != _bottomrightLatitude)
                {
                    _bottomrightLatitude = value;
                    NotifyPropertyChanged("BottomRightLatitude");
                }
            }
        }

        private double _bottomrightLongitude;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public double BottomRightLongitude
        {
            get
            {
                return _bottomrightLongitude;
            }
            set
            {
                if (value != _bottomrightLongitude)
                {
                    _bottomrightLongitude = value;
                    NotifyPropertyChanged("BottomRightLongitude");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
